/* Layout */
import Layout from '@/layout'

const projectRouter = [
  // 货源中心
  {
    path: '/shop-center',
    component: Layout,
    redirect: '/shop-center/fine-shop',
    name: 'ShopCenter',
    meta: { title: '货源中心', icon: 'el-icon-box' },
    children: [
      {
        path: 'fine-shop',
        component: () => import('@/views/shop-center/fine-shop'),
        name: 'FineShop',
        meta: { title: '精选货源' }
      },
      {
        path: '1688-image-search',
        component: () => import('@/views/shop-center/1688-image-search'),
        name: '1688ImageSearch',
        meta: { title: '1688图搜' }
      },
      {
        path: '1688-sell',
        component: () => import('@/views/shop-center/1688-sell'),
        name: '1688Sell',
        meta: { title: '1688分销' }
      },
      {
        path: '1688-send',
        component: () => import('@/views/shop-center/1688-send'),
        name: '1688Send',
        meta: { title: '1688一件代发' }
      }
    ]
  },
  // 商品裂变
  {
    path: '/shop-change',
    component: Layout,
    children: [
      {
        path: 'index',
        component: () => import('@/views/shop-change/index'),
        name: 'ShopChange',
        meta: { title: '商品裂变', icon: 'el-icon-share' }
      }
    ]
  },
  // 商品管理（redirect重定向）
  {
    path: '/shop-manage',
    component: Layout,
    redirect: '/shop-manage/shop-list',
    name: 'ShopManage',
    meta: {
      title: '商品管理',
      icon: 'el-icon-s-order'
    },
    children: [
      {
        path: 'shop-list',
        component: () => import('@/views/shop-manage/shop-list'),
        name: 'ShopList',
        meta: { title: '商品列表' }
      },
      {
        path: 'batch-update',
        component: () => import('@/views/shop-manage/batch-update'),
        name: 'BatchUpdate',
        meta: { title: '批量修改' }
      },
      {
        path: 'update-record',
        component: () => import('@/views/shop-manage/update-record'),
        name: 'updateRecord',
        meta: { title: '修改记录' }
      }
    ]
  },
  {
    path: '/goods-copy',
    component: Layout,
    redirect: '/goods-copy/copy',
    name: 'GoodsCopy',
    meta: {
      title: '商品复制',
      icon: 'el-icon-s-order'
    },
    children: [
      {
        path: 'copy',
        component: () => import('@/views/goods-copy/copy'),
        name: 'Copy',
        meta: { title: '一键复制' }
      },
      {
        path: 'record',
        component: () => import('@/views/goods-copy/record'),
        name: 'Record',
        meta: { title: '复制记录' }
      }
    ]
  },
  {
    path: '/optimization',
    component: Layout,
    redirect: '/optimization/watermark',
    name: 'Optimization',
    meta: {
      title: '商品优化',
      icon: 'el-icon-s-order'
    },
    children: [
      {
        path: 'watermark',
        component: () => import('@/views/optimization/watermark'),
        name: 'Watermark',
        meta: { title: '主图水印' }
      },
      {
        path: 'video',
        component: () => import('@/views/optimization/video'),
        name: 'video',
        meta: { title: '主图视频' }
      },
      {
        path: 'white',
        component: () => import('@/views/optimization/white'),
        name: 'White',
        meta: { title: '白底图' }
      }
    ]
  },
  // 商品美图
  {
    path: '/shop-beautify',
    component: Layout,
    children: [
      {
        path: 'index',
        component: () => import('@/views/shop-beautify/index'),
        name: 'ShopBeautify',
        meta: { title: '商品美图', icon: 'el-icon-goods' }
      }
    ]
  },
  {
    path: '/check',
    component: Layout,
    redirect: '/check/checkup',
    name: 'Check',
    meta: {
      title: '商品检测',
      icon: 'el-icon-s-order'
    },
    children: [
      {
        path: 'repeat',
        component: () => import('@/views/check/repeat'),
        name: 'Repeat',
        meta: { title: '重复商品检测' }
      },
      {
        path: 'checkup',
        component: () => import('@/views/check/checkup'),
        name: 'Checkup',
        meta: { title: '商品体检' }
      },
      {
        path: 'prohibited',
        component: () => import('@/views/check/prohibited'),
        name: 'Prohibited',
        meta: { title: '违禁词检测' }
      }
    ]
  },
  // 商品导出
  {
    path: '/shop-export',
    component: Layout,
    children: [
      {
        path: 'index',
        component: () => import('@/views/shop-export/index'),
        name: 'shopExport',
        meta: { title: '商品导出', icon: 'el-icon-sell' }
      }
    ]
  },
  // 店群管理
  {
    path: '/shore-manage',
    component: Layout,
    children: [
      {
        path: 'index',
        component: () => import('@/views/shore-manage/index'),
        name: 'storeManage',
        meta: { title: '店群管理', icon: 'el-icon-user' }
      }
    ]
  },
  // 帮助中心
  {
    path: '/help-center',
    component: Layout,
    children: [
      {
        path: 'index',
        component: () => import('@/views/help-center/index'),
        name: 'helpCenter',
        meta: { title: '帮助中心', icon: 'el-icon-question' }
      }
    ]
  }
]

export default projectRouter
